/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package bikes.ship;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Aganguly
 */
@Entity
@Table(name = "shipmentrecord")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Shipmentrecord.findAll", query = "SELECT s FROM Shipmentrecord s"),
    @NamedQuery(name = "Shipmentrecord.findByShipmentId", query = "SELECT s FROM Shipmentrecord s WHERE s.shipmentId = :shipmentId"),
    @NamedQuery(name = "Shipmentrecord.findByShipmentDetails", query = "SELECT s FROM Shipmentrecord s WHERE s.shipmentDetails = :shipmentDetails"),
    @NamedQuery(name = "Shipmentrecord.findByStatus", query = "SELECT s FROM Shipmentrecord s WHERE s.status = :status"),
    @NamedQuery(name = "Shipmentrecord.findByShipDate", query = "SELECT s FROM Shipmentrecord s WHERE s.shipDate = :shipDate"),
    @NamedQuery(name = "Shipmentrecord.findByDeliveryDate", query = "SELECT s FROM Shipmentrecord s WHERE s.deliveryDate = :deliveryDate")})
public class Shipmentrecord implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "ShipmentId")
    private Long shipmentId;
    @Basic(optional = false)
    @Column(name = "ShipmentDetails")
    private String shipmentDetails;
    @Column(name = "Status")
    private String status;
    @Column(name = "ShipDate")
    @Temporal(TemporalType.DATE)
    private Date shipDate;
    @Column(name = "DeliveryDate")
    @Temporal(TemporalType.DATE)
    private Date deliveryDate;

    public Shipmentrecord() {
    }

    public Shipmentrecord(Long shipmentId) {
        this.shipmentId = shipmentId;
    }

    public Shipmentrecord(Long shipmentId, String shipmentDetails) {
        this.shipmentId = shipmentId;
        this.shipmentDetails = shipmentDetails;
    }

    public Long getShipmentId() {
        return shipmentId;
    }

    public void setShipmentId(Long shipmentId) {
        this.shipmentId = shipmentId;
    }

    public String getShipmentDetails() {
        return shipmentDetails;
    }

    public void setShipmentDetails(String shipmentDetails) {
        this.shipmentDetails = shipmentDetails;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Date getShipDate() {
        return shipDate;
    }

    public void setShipDate(Date shipDate) {
        this.shipDate = shipDate;
    }

    public Date getDeliveryDate() {
        return deliveryDate;
    }

    public void setDeliveryDate(Date deliveryDate) {
        this.deliveryDate = deliveryDate;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (shipmentId != null ? shipmentId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Shipmentrecord)) {
            return false;
        }
        Shipmentrecord other = (Shipmentrecord) object;
        if ((this.shipmentId == null && other.shipmentId != null) || (this.shipmentId != null && !this.shipmentId.equals(other.shipmentId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "bikes.ship.Shipmentrecord[ shipmentId=" + shipmentId + " ]";
    }
    
}
